package com.dwy2002.enums;

/**
 * @author 杜伟毅
 * @version 1.0
 * @since 2025/02/12
 */
public enum Status {
    OK(200, "获取成功"),
    CREATED(201, "资源已创建"),
    NO_CONTENT(204, ""),
    BAD_REQUEST(400, "请求参数错误"),
    UNAUTHORIZED(401, "未授权访问"),
    FORBIDDEN(403, "禁止访问"),
    NOT_FOUND(404, "资源不存在"),
    INTERNAL_ERROR(500, "系统错误，请联系管理员"),
    SERVICE_UNAVAILABLE(503, "服务暂不可用");

    public final int code;
    public final String defaultMessage;

    Status(int code, String defaultMessage) {
        this.code = code;
        this.defaultMessage = defaultMessage;
    }
}
